import request from "@/utils/request";

// 提交订单
export function submitOrder(data) {
  return request({
    url: "cashierOrder/submit",
    method: "post",
    data: data,
  });
}

// 查询订单信息
export function getOrderInfo(params) {
  return request({
    url: "order/detail",
    method: "get",
    params: params,
  });
}

// 获取配置信息
export function getSettingInfo() {
  return request({
    url: "backendApi/order/setting",
    method: "get",
  });
}

// 保存配置
export function saveSetting(data) {
  return request({
    url: "backendApi/order/saveSetting",
    method: "post",
    data: data,
  });
}

export function transmitNotify() {
  return request({
    url: "cashierOrder/transmitNotify",
    method: "get"
  });
}

export function listDistance(orderId) {
  return request({
    url: '/cashierOrder/listDistance',
    method: 'get',
    params: { orderId }
  })
}

export function transmitConfirm(data) {
  return request({
    url: '/cashierOrder/transmitConfirm',
    method: 'post',
    data
  })
}
